package interfazgrafikoak;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class Leihoa {


	public static void main(String[] args){
	
		Leihoa _leihoa = new Leihoa();

		JOptionPane optionPane = new JOptionPane(
	            "Ulertu al duzu nola sortu behar diren \n"
	            + "horrelako leihoak Javan?.\n",
	            JOptionPane.QUESTION_MESSAGE,
	           JOptionPane.YES_NO_OPTION);

		JFrame frame = new JFrame();
		
		JDialog dialog = new JDialog(frame, 
	                         "JDialog adibidea",
	                         true);
		
		dialog.setContentPane(optionPane);
	
		dialog.setDefaultCloseOperation(
			JDialog.EXIT_ON_CLOSE);
	

		dialog.pack();
		dialog.setVisible(true);
	}
	
}